#include "Acceptor.hpp"
#include "TcpConnection.hpp"
#include <iostream>

using std::cout;
using std::endl;

int main()
{
    wd::Acceptor acceptor(8000);
    acceptor.ready();

    wd::TcpConnection conn(acceptor.accept());
    cout << conn.toString() << " has connected.\n";

    string msg = conn.receive();

    cout << "recv msg:" << msg << endl;

    conn.send(msg);


    return 0;
}

